250217 Step-Video-T2V Reading & Porting
框架特点
api/call_remote_server.py 展示了vae,text-encoder在不同GPU分离的计算系统。
JSON配置
VAE
from stepvideo.vae.vae import AutoencoderKL- vae 约 1、2GB ^3
- 如何接入DiT流程的?如何逐步替换OSP1.5
1 | def decode_vae(self, samples): |
text encoder
- stepllm(约40GB) 和 HunyuanClip(4GB)^3 融成了
self.caption - prompt 通过 encode_prompt 产生 encoder_hidden_states 经过 caption_projection
1 | def build_llm(self, model_dir): |
DiT
StepVideoModel- 怎么接入text—encoder的;url的接口,怎么改回去?
- 把 encode_prompt 里的 asyncio.run 改回去即可。
- xfuser并行库?是否要去掉
- flowMatch
scheduler: FlowMatchDiscreteScheduler,
模型diffusion_pytorch_model-00001-of-00006.safetensors约58GB^3
适配流程
- 先训练再推理
- 将推理硬编码的超参变成json里可选的超参,并且各个组件传递tensor时要对齐。
- 问题:VAE和DiT的channel怎么对齐的?超参正好都是8,predictor:in_channels == ae:latent_dim == 8
- 超参改变权重还能加载吗?
- 推理:由于权重的超参是固定的,还不一定能跑得下。
参考文献
250217 Step-Video-T2V Reading & Porting